package com.example.pinkcat.fragment.shouye;

import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.OrientationEventListener;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.OrientationHelper;
import androidx.recyclerview.widget.RecyclerView;

import com.example.pinkcat.R;
import com.example.pinkcat.adapter.Fenqu_RecyclerViewAdapter;

public class Fragment_fenqu extends Fragment {

    private RecyclerView.LayoutManager mLayoutManager;

    private RecyclerView recyclerView;

    private View view;

    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        return inflater.inflate(R.layout.fragment_fenqu,container,false);
    }


    @Override
    public void onResume() {
        super.onResume();

    }

    @SuppressLint("WrongConstant")
    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);

        mLayoutManager = new GridLayoutManager(view.getContext(),4, OrientationHelper.VERTICAL,false);
        recyclerView = view.findViewById(R.id.fenqu_RV);
        recyclerView.setLayoutManager(mLayoutManager);


        Fenqu_RecyclerViewAdapter fenquAdapter = new Fenqu_RecyclerViewAdapter(view.getContext());
        recyclerView.setAdapter(fenquAdapter);





    }
}
